package com.example.store2024.service.impl;

import com.example.store2024.dao.CategoryDao;
import com.example.store2024.model.Category;
import com.example.store2024.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CategoryServiceImpl implements CategoryService {
    private CategoryDao categoryDao;

    @Autowired
    public void setCategoryDao(CategoryDao categoryDao){
        this.categoryDao = categoryDao;
    }

    @Override
    public List<Category> findAll() {
        return this.categoryDao.findAll();
    }
}
